package com.zdft.promotion.promotion.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zdft.promotion.promotion.bean.PromotionRulesBean;
import com.zdft.promotion.promotion.mapper.PromotionRulesMapper;
import com.zdft.promotion.promotion.service.api.IPromotionRulesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class PromotionRulesServiceImpl extends ServiceImpl<PromotionRulesMapper, PromotionRulesBean> implements IPromotionRulesService {

    @Autowired
    PromotionRulesMapper promotionRulesMapper;

    @Override
    @Transactional
    public void delete(Long id) {
        // 删除促销规则
        promotionRulesMapper.deleteById(id);
        // 删除单品分档

        // 删除其他四种 TODO

        // 删除促销范围
    }
}